<!-- 垂直导航 -->
<nav class="navbar-vertical navbar-expand-lg" >
    <div class="navbar-brand-wrapper">
        <a href="dashboard.php" class="navbar-brand">仓库管理系统</a>
    </div>
    <div class="navbar-collapse">
        <ul class="navbar-nav">
            <li class="nav-item">
                <a href="inventory.php" class="nav-link">库存管理</a>
            </li>
            <li class="nav-item">
                <a href="stock_in.php" class="nav-link">入库</a>
            </li>
            <li class="nav-item">
                <a href="stock_out.php" class="nav-link">出库</a>
            </li>
            <?php if ($_SESSION['role'] === 'admin'): ?>            
            <li class="nav-item">
                <a href="users.php" class="nav-link">用户管理</a>
            </li>
            <li class="nav-item">
                <a href="stock.php" class="nav-link">出库库记录</a>
            </li>
                      
            <li class="nav-item">
                <a href="operation_logs.php" class="nav-link">操作日志</a>
            </li>
            <?php endif;?>
            <li class="nav-item dropdown">
                <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
                    <?= $_SESSION['role'] === 'admin' ? '管理员' : '用户' ?>
                </a>
                <div class="dropdown-menu">
                    <a class="dropdown-item" href="logout.php">注销</a>
                    <a class="dropdown-item" href="change_password.php">修改密码</a>
                </div>
            </li>
        </ul>
    </div>
</nav>